﻿<%@ Page Language="C#" MasterPageFile="~/Index.master" AutoEventWireup="true" CodeFile="shoppingCar.aspx.cs" Inherits="shoppingCar" Title="购物车" %>

<%--购物车--%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
   <link rel="Stylesheet" type="text/css" href="Style/StyleSheet.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" Runat="Server">
    <div style="margin:0 auto; width:604px">
    <table style="margin-top:20px; border:solid 1px #33CCFF; background-color:White" rules="all" >
      <tr>
        <td style="width:604px; height:30px; text-align:center; font-size:xx-large; font:#ffffff; background-color:#33CCFF" >购物车</td>
      </tr>
      <tr>
         <td>
            <asp:GridView id="ShoppingList" runat="server" Width="604px"
                  AutoGenerateColumns="False" onrowcommand="ShoppingList_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
		                <HeaderStyle Width="70px"></HeaderStyle>
		                <ItemTemplate>
			                <asp:CheckBox id="IsChecked" runat="server" />
		                </ItemTemplate>
	                </asp:TemplateField>
	                <asp:TemplateField HeaderText="编号">
		                <HeaderStyle Width="50px"></HeaderStyle>
		                <ItemTemplate>
			                <asp:Label id="BookId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Book_Idint")%>'>
			                </asp:Label>
		                </ItemTemplate>
	                </asp:TemplateField>
	                <asp:BoundField DataField="Book_Namestr" HeaderText="商品名称" />			    
	                <asp:TemplateField HeaderText="单价">
		                <HeaderStyle Width="60px"></HeaderStyle>
		                <ItemTemplate>
			                ￥
			                <asp:Label id="Price" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Book_Price")%>' >
			                </asp:Label>
		                </ItemTemplate>
	                </asp:TemplateField>
	                <asp:TemplateField HeaderText="数量">
		                <HeaderStyle Width="70px"></HeaderStyle>
		                <ItemTemplate>
			                <asp:TextBox id="Count" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"Book_Count")%>' Columns="8" MaxLength="3">
			                </asp:TextBox>
		                </ItemTemplate>
	                </asp:TemplateField>
	                <asp:TemplateField  HeaderText="删除">  
                        <ItemTemplate>  
                           <asp:LinkButton ID="LinkButton1" runat="server" CommandName="deleteBook"  ForeColor="Blue"
                          CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Book_Idint")%>'   Text="删除" OnClientClick='<%#  "if (!confirm(\"你确定要删除吗?\")) return false;"%>'></asp:LinkButton>  
                        </ItemTemplate>  
                    </asp:TemplateField>    
                </Columns>
            </asp:GridView>                     
         </td>
      </tr>
      <tr>
        <td style="text-align:center">
          <strong>总计￥：</strong>
          <asp:Label ID="sumPrice" runat="server"></asp:Label>
        </td>
      </tr>
      <tr>
        <td style="text-align:center">
          <asp:Button ID="Button1" Text="结账" Width="78px" runat="server" onclick="Unnamed2_Click"/>
        </td>
      </tr>
    </table>
  </div>
</asp:Content>

